package com.jxsm.controller;

import com.jxsm.pojo.PackingList;
import com.jxsm.service.PackingListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.concurrent.ForkJoinPoolFactoryBean;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

/**
 * Created by Administrator on 2016/11/15.
 */
@Controller
public class PackingListContorller extends BaseController {
    @Autowired
    private PackingListService packingListService;

    @RequestMapping("/cargo/contract/packingLIst/list.action")
    public  String tolist(Map<String,Object> map){
      map.put("obj",packingListService.find(null));
        return  "/cargo/contract/packingLIst/packinglist.jsp";
    }
    @RequestMapping("/cargo/contract/packingLIst/tocreat.action")
    public String tocreate(String [] id,Map map){
        map.put("Divdata",packingListService.getDivData(id));
        return "/cargo/contract/packingLIst/PackingListCreate.jsp";
    }
    @RequestMapping("/cargo/contract/packingLIst/insert.action")
    public String toinsert(PackingList packingList){
        packingListService.insert(packingList);
        return "redirect:/cargo/contract/packingLIst/list.action";
    }
}
